package com.repairService.business.controller;

import com.repairService.business.service.RepairServiceTestService;
import com.repairService.core.base.BaseController;
import com.repairService.core.model.ResponseJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/bussiness")
public class RepairTestController extends BaseController{

    @Autowired
    private RepairServiceTestService repairServiceTestService;

    @RequestMapping("/test")
    public ResponseJson test(){
        try {
            List<Map<String,Object>> mapList = repairServiceTestService.selectMapList();
//            return repairServiceTestService.selectCount();
            return renderSuccess(mapList);
        }catch (Exception e){
            return renderError("操作失败");
        }
    }

}
